from datetime import datetime
import time

struct_times = time.struct_time
print(struct_times)
print(struct_times['tm_hour'])






now = time.time() # 当前时间戳
start = '2019-12-03 18:00:00'
start_time = datetime.fromisoformat(start)
start_timestamp = datetime.timestamp(start_time)

end = '2019-12-05'
end_time = datetime.fromisoformat(end)
end_timestamp = datetime.timestamp(end_time)

if start_timestamp <= now <= end_timestamp:
    print("恭喜你，可以参与活动")
else:
    print("抱歉，当前不在活动时间内")

print(datetime.fromtimestamp(now))
